package com.megan.design.principle.compositionaggregation;

/**
 * @Author: megan
 * @Data: 2018/8/24 上午7:21
 * @Description:
 */
public class Test {
    public static void main(String[] args) {
        ProductDao dao = new ProductDao();
        dao.setDbCommection(new MySQLConnection());
        dao.addProduct();
        dao.setDbCommection(new PostgreSQLConnection());
        dao.addProduct();
    }
}
